package cn.wen.yinxiu.order.service;

import cn.wen.yinxiu.order.vo.*;
import com.baomidou.mybatisplus.extension.service.IService;
import cn.wen.yinxiu.common.toolkit.PageUtils;
import cn.wen.yinxiu.order.entity.OrderEntity;

import java.util.Map;

/**
 *
 * @ClassName: OrderService
 * @Author 小飞
 * @Email coderwen22@163.com
 * @Date 2023-05-22 09:48:19
 * @Description: 订单的Service类
 */
public interface OrderService extends IService<OrderEntity> {

    PageUtils queryPage(Map<String, Object> params);

    /**
     * 创建订单
     *
     * @param userId
     * @param skuId
     * @return
     */
    OrderConfirmVo confirmOrder(Long userId, Long skuId);

    /**
     * 提交订单
     *
     * @param vo
     * @return
     */
    SubmitOrderResponseVO submitOrder(OrderSubmitVO vo);

    /**
     * 通过订单号获取订单信息
     *
     * @param orderSn
     * @return
     */
    OrderEntity getOrderByOrderSn(String orderSn);

    /**
     * 支付回调
     *
     * @param payAggregateRoot
     */
    void callbackPay(Pay payAggregateRoot);

    /**
     * 公共支付服务
     *
     * @param requestParam
     * @return
     */
    String payCommonService(PayRequest requestParam);
}

